<el-form ref="form" :model="form" :rules="rules" label-width="150px">
    <el-row>
        <span>建单信息</span>
    </el-row>
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="申请人" prop="GWCAORIU_NAME">
                <el-input v-model="form.GWCAORIU_NAME" readonly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="申请人组织" prop="GWCAORIG_NAME">
                <el-input v-model="form.GWCAORIG_NAME" readonly></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="销售地区" prop="GWCA001_NAME">
                <el-input v-model="form.GWCA001_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwca001" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="申请日期" prop="GWCADOCDATE">
                <el-date-picker
                        v-model="form.GWCADOCDATE"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="申请编号">
                <el-input v-model="form.GWCADOCNO" readonly>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="订单类型" prop="GWCA002">
                <el-select v-model="form.GWCA002" clearable>
                    <el-option v-for="item in selectOptions.gwca002Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
    </el-row>
    <el-row>
        <span>招投信息</span>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="招投标" prop="GWCA003">
                <el-select v-model="form.GWCA003" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="招标编号" prop="GWCA004" :rules="!gwca004Show">
                <el-input v-model="form.GWCA004" readonly :clearable="gwca004Show">
                    <i v-show="gwca004Show" class="el-icon-search el-input__icon" @click="openGwca004" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="项目名称">
                <el-input v-model="form.GWGC022" readonly>
                </el-input>
            </el-form-item>
        </el-col>
    </el-row>
    <el-row>
        <span>合同信息</span>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同编号">
                <el-input v-model="form.GWCA005" readonly>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="客户单位" prop="GWCA055">
                <el-input v-model="form.GWCA055" readonly>
                    <i class="el-icon-search el-input__icon" @click="openGwca006" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="组织形式" prop="GWAK009">
                <el-select v-model="form.GWAK009" disabled>
                    <el-option v-for="item in selectOptions.gwak009Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="最终用户" prop="GWCA007">
                <el-input v-model="form.GWCA007" clearable>
                   <!-- <i class="el-icon-search el-input__icon" @click="openGwca007" slot="suffix"></i>-->
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同签订组织" prop="GWCAMLEGAL_NAME">
                <el-input v-model="form.GWCAMLEGAL_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openGwcamlegal" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="设备使用地点" prop="DEVICEADDRESS">
                <el-input v-model="form.DEVICEADDRESS" readonly>
                    <i class="el-icon-search el-input__icon" @click="openDeviceAddress" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <!--<el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            &lt;!&ndash;<el-form-item label="省/市">
                <el-select v-model="form.GWCA011" placeholder="请选择" @change="changeGwca011" clearable>
                    <el-option v-for="item in selectOptions.gwca011Options"
                               :key="item.GWAD002"
                               :label="item.GWADL004"
                               :value="item.GWAD002">
                    </el-option>
                </el-select>
            </el-form-item>&ndash;&gt;
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            &lt;!&ndash;<el-form-item label="市/区">
                <el-select v-model="form.GWCA012" placeholder="请选择" @change="changeGwca012" clearable>
                    <el-option v-for="item in selectOptions.gwca012Options"
                               :key="item.GWAD002"
                               :label="item.GWADL004"
                               :value="item.GWAD002">
                    </el-option>
                </el-select>
            </el-form-item>&ndash;&gt;
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
           &lt;!&ndash; <el-form-item label="县/区">
                <el-select v-model="form.GWCA013" placeholder="请选择" @change="changeGwca013" clearable>
                    <el-option v-for="item in selectOptions.gwca013Options"
                               :key="item.GWAD002"
                               :label="item.GWADL004"
                               :value="item.GWAD002">
                    </el-option>
                </el-select>
            </el-form-item>&ndash;&gt;
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="乡/镇">
                <el-select v-model="form.GWCA014" placeholder="请选择" @change="changeGwca014" clearable>
                    <el-option v-for="item in selectOptions.gwca014Options"
                               :key="item.GWAD002"
                               :label="item.GWADL004"
                               :value="item.GWAD002">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="街道/村">
                <el-select v-model="form.GWCA015" placeholder="请选择" @change="changeGwca015" clearable>
                    <el-option v-for="item in selectOptions.gwca015Options"
                               :key="item.GWAD002"
                               :label="item.GWADL004"
                               :value="item.GWAD002">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
            <el-form-item label="详细地址">
                <el-input v-model="form.GWCA016" clearable>
                </el-input>
            </el-form-item>
        </el-col>-->
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="客户负责人" prop="GWCA017">
                <el-input v-model="form.GWCA017" clearable>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系方式" prop="GWCA018">
                <el-input v-model="form.GWCA018" clearable>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="毛利率是否低于20%">
                <el-select v-model="form.GWCA019" disabled>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="支付方式" prop="GWCA020">
                <el-select v-model="form.GWCA020" clearable>
                    <el-option v-for="item in selectOptions.gwca020Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="首付款比例" prop="GWCA021">
                <el-select v-model="form.GWCA021" clearable>
                    <el-option v-for="item in selectOptions.gwca021Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="首付款支付时间">
                <el-date-picker
                        v-model="form.GWCA022"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="付款方式" prop="GWCA059">
                <el-input v-model="form.GWCA059"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="附加费用">
                <el-select
                        v-model="form.GWCA061_LIST"
                        multiple>
                    <el-option v-for="item in selectOptions.gwca061Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="质保金情况" prop="GWCA023">
                <el-select v-model="form.GWCA023" clearable>
                    <el-option v-for="item in selectOptions.gwca023Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="质保期" prop="GWCA024">
                <el-input-number v-model="form.GWCA024" style="width: 100%"></el-input-number>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="付款周期" prop="GWCA025">
                <!--<el-input-number v-model="form.GWCA025" style="width: 100%"></el-input-number>-->
                <el-select v-model="form.GWCA025" clearable>
                    <el-option v-for="item in selectOptions.gwca025Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="交货日期" prop="GWCA026">
                <el-date-picker
                        v-model="form.GWCA026"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="交货沟通情况">
                <el-select v-model="form.GWCA027" disabled>
                    <el-option v-for="item in selectOptions.gwca027Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="不满足原因">
                <el-input v-model="form.GWCA028" readonly>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="需配件赠送" prop="GWCA029">
                <el-select v-model="form.GWCA029" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="16" :md="16" :lg="16" :xl="16">
            <el-form-item label="配件明细">
                <el-input v-model="form.GWCA030">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="喷涂方案制作" prop="GWCA031">
                <el-select v-model="form.GWCA031" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="喷涂类型">
                <el-select v-model="form.GWCA032" clearable :disabled = "form.GWCA031 == 'N'">
                    <el-option v-for="item in selectOptions.gwca032Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="喷涂内容">
                <el-input v-model="form.GWCA033" :disabled = "form.GWCA031 == 'N'">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="是否公司合同范本" prop="GWCA034">
                <el-select v-model="form.GWCA034" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="邮寄否" prop="GWCA035">
                <el-select v-model="form.GWCA035" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同签订日期" prop="GWCA036">
                <el-date-picker
                        v-model="form.GWCA036"
                        type="date"
                        value-format="yyyy-MM-dd"
                        @change="changeGwca036"
                        style="width:100%;">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同归档日期">
                <el-date-picker
                        v-model="form.GWCA037"
                        type="date"
                        value-format="yyyy-MM-dd"
                        style="width:100%;" disabled>
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="归档份数">
                <el-input-number v-model="form.GWCA038" style="width: 100%">
                </el-input-number>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="中标通知书份数">
                <el-input-number v-model="form.GWCA039" style="width: 100%">
                </el-input-number>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="印章名称" prop="GWCA060">
                <el-select v-model="form.GWCA060" clearable>
                    <el-option v-for="item in selectOptions.gwca060Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同总数量(台/套)">
                <el-input v-model="form.GWCA040" readonly>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="合同总金额（元）">
                <el-input v-model="form.GWCA041" readonly>
                </el-input>
            </el-form-item>
        </el-col>

        <el-col :xs="16" :sm="16" :md="16" :lg="16" :xl="16">
            <el-form-item label="附件" class="c-upload-text" prop="GWCA062">
                <el-input v-model="form.GWCA062" v-show="true"></el-input>
                <el-upload
                        style="width: 90%"
                        class="upload-demo"
                        ref="upload2"
                        v-model="form.GWCA062"
                        :action="uploadUrl"
                        :file-list="fileList"
                        list-type="text"
                        :on-preview="handleFilePreview"
                        :before-upload="beforeUploadFiles"
                        :on-remove="handleFileRemove"
                        :on-success="successUploadFiles"
                        :auto-upload="false">
                    <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                </el-upload>
                <!--<a :href="address" target="_blank" style="width:40px;">下载</a>-->
            </el-form-item>
        </el-col>
    </el-row>

<!--</el-form>
<el-form ref="form" :model="form" :rules="rules" label-width="220px">-->
    <el-row>
        <span>发票信息</span>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="开票单位与合同单位是否一致" prop="GWCA042" label-width="220px">
                <el-select v-model="form.GWCA042" clearable>
                    <el-option v-for="item in selectOptions.sys_n_y" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="开票单位" prop="GWCA043">
                <el-input v-model="form.GWCA043" :clearable="!gwca043Readonly" :readonly="gwca043Readonly">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="发票类型">
                <el-select v-model="form.GWCA044" clearable>
                    <el-option v-for="item in selectOptions.gwca044Options" :label="item.value"
                               :value="item.code"></el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="开票地址" prop="GWCA045">
                <el-input v-model="form.GWCA045">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="组织机构代码证/统一信用代码证" label-width="220px">
                <el-input v-model="form.GWCA046">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系人">
                <el-input v-model="form.GWCA047">
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="联系电话">
                <el-input v-model="form.GWCA048">
                </el-input>
            </el-form-item>
        </el-col>
    </el-row>
<!--    <el-row>-->
<!--        <span>回款信息</span>-->
<!--    </el-row>-->
<!--    <el-row>-->
<!--        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">-->
<!--            <el-form-item label="已回款">-->
<!--                <el-input></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">-->
<!--            <el-form-item label="未回款">-->
<!--                <el-input></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">-->
<!--            <el-form-item label="逾期金额">-->
<!--                <el-input></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">-->
<!--            <el-form-item label="账龄">-->
<!--                <el-input></el-input>-->
<!--            </el-form-item>-->
<!--        </el-col>-->
<!--    </el-row>-->
    <el-row>
        <span>合同明细</span>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="pos-re" style="margin-top: 10px;">
                <div class="pos-ab">
                    <el-button v-show="!isDetail" type="primary" icon="el-icon-plus" size="mini" class="z-depth-2"
                               @click="addGwcb">添加
                    </el-button>
                    <el-button v-show="!isDetail" type="primary" icon="el-icon-delete" size="mini" class="z-depth-2"
                               @click="delGwcb">删除
                    </el-button>
                </div>
                <div class="table-responsive" style="margin-top: 5px;">
                    <table id="gwci001_gwcb_table"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwci001_gwcb_table">
                    </table>
                </div>
            </div>
        </el-col>
    </el-row>
    <el-row>
        <span>收款计划</span>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="pos-re" style="margin-top: 10px;">
                <div class="pos-ab">
                    <el-button v-show="!isDetail" type="primary" icon="el-icon-plus" size="mini" class="z-depth-2"
                               @click="addGwcc">添加
                    </el-button>
                    <el-button v-show="!isDetail" type="primary" icon="el-icon-delete" size="mini" class="z-depth-2"
                               @click="delGwcc">删除
                    </el-button>
                </div>
                <div class="table-responsive" style="margin-top: 5px;">
                    <table id="gwci001_gwcc_table"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="gwci001_gwcc_table">
                    </table>
                </div>
            </div>
        </el-col>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right;margin-top: 10px;">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button v-show="!isDetail" type="warning" icon="icon iconfont icon-21" size="mini" @click="sure">保存</el-button>
        </el-col>
    </el-row>
</el-form>
<script>
    require(["pc/crm/gwci001_edit"], $.noop);
</script>
